/**基础设置-商品收费类型API**/
import obj from '@/utils/request'
let {request,baseURL} = obj

//查询所有商品收费信息
export function getPostage(params) {
  return request({
    url: '/goodsCostInfo',
    method: 'get',
    params
  })
}
//添加收费信息详情
export function addPostage(data) {
  return request({
    url: '/goodsCostInfo',
    method: 'post',
    data
  })
}
//修改收费信息详情
export function modPostage(data) {
  return request({
    url: '/goodsCostInfo',
    method: 'put',
    data
  })
}
//删除收费信息详情
export function delPostage(ids) {
  return request({
    url: '/goodsCostInfo',
    method: 'delete',
    data:ids
  })
}
//查看单个收费信息详情
export function getPostageInfo(id) {
  return request({
    url: '/goodsCostInfo/'+id,
    method: 'get',
  })
}
//禁用启用收费信息详情
export function disableOrEnablePostage(stores,params) {
  return request({
    url: '/goodsCostInfo/disableOrEnable',
    method: 'put',
    data:stores,
    params
  })
}
//查询所有商品收费信息
export function getPostageByCustomer(customer) {
  return request({
    url: '/goodsCostInfo/customer/'+customer,
    method: 'get',
  })
}
